#ifndef FIRSTPERSONCAMERA_H_
#define FIRSTPERSONCAMERA_H_

#ifdef WIN32
#include <windows.h>
#endif

#include <vmmlib/vector3.h>
#include <GL/gl.h>

namespace Graphics
{
  class FirstPersonCamera
  {
  public:
    FirstPersonCamera();
    FirstPersonCamera(double x, double y, double z);
    FirstPersonCamera(const FirstPersonCamera &other);
    ~FirstPersonCamera();

    FirstPersonCamera& operator=(const FirstPersonCamera &rhs);

    void Move(const vmml::Vector3d Direction);
    void RotateX (double Angle);
    void RotateY (double Angle);

    void MoveForwards(double Distance);
    void StrafeRight(double Distance);

    void setModelView() const;
  private:
    vmml::Vector3d position, viewdir;
    bool viewdirchanged;
    double rotatedX, rotatedY, rotatedZ;

    void GetViewDir();

#ifdef WIN32
#define PI 3.1415265359
#define PIdiv180 0.0174529251994444444
#else
    static const double PI = 3.1415265359;
    static const double PIdiv180 = 3.1415265359/180.0;
#endif
  };

}

#endif
